import React, { Component } from 'react';
import PropTypes from 'prop-types';

import { Link } from 'react-router-dom';

class NavItem extends Component {

    render() {
        const { link, text } = this.props;

        return(
            <Link to={ link } className="navItem">
                <div className="tag">{ text }</div>
            </Link>
        );
    }
}

NavItem.displayName = "NavItem";

NavItem.propTypes = {
    text: PropTypes.string,
    link: PropTypes.string
};

export default NavItem;
